import React, { PureComponent } from 'react'
import { Spin } from 'antd';
import Styles from "@/scss/index.scss"
//加载中蒙层,传入布尔值进行渲染判断
class LoadingLayer extends PureComponent<Iprops, any>{
  render() {
    return (
      <div>
        {this.props.loading ?
          <div className={Styles.loading}><Spin tip="Loading..." size="large"></Spin></div> :
          <div></div>}
      </div>
    )
  }
}
//传入的只能是boolean
type Iprops = {
  loading: boolean
}
export default LoadingLayer